<?php
namespace app\api\validate;

class Submit extends Base
{
    protected $rule =   [
        'username'      => 'require|max:60',        // 姓名
        'email'         => 'email',                 // 邮箱
        'mobile'        => 'require|mobile',        // 手机
        'content'       => 'max:240',               // 内容
        
    ];
    
    protected $message =   [
        'username.require'      => '姓名必须',
        'username.max'          => '姓名不能超过20个字符',
        'email'                 => '邮箱格式不正确',
        'mobile.require'        => '电话必须',
        'mobile.mobile'         => '电话格式不正确',
        'content.max'           => '不能超过80个字符',
        
    ];
    
    protected $scene =  [
        # 用户上传带规格的商品
        'contact_us'     => ['username', 'email', 'mobile', 'content'],
    ];
    
}
